home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / borland / svgabg52.zip / SVGAS3.H < prev    next >
Text File  |  1992-06-25  |  1KB  |  52 lines

  1. /************************************************/
  2. /*                         */
  3. /*        SuperVGA S3 BGI driver defines    */
  4. /*        Copyright (c) 1992        */
  5. /*        Jordan Hargraphix Software        */
  6. /*                        */
  7. /************************************************/
  8.  
  9. extern int far _Cdecl SvgaS3_fdriver[];
  10.  
  11. /* These are the currently supported modes */
  12. #ifndef SVGAS3_640x480x256
  13. #define    SVGAS3_640x480x256    0    /* 640x480x256 S3 Svga */
  14. #define    SVGAS3_800x600x256    1    /* 800x600x256 S3 Svga */
  15. #define    SVGAS3_1024x768x256    2    /* 1024x768x256 S3 Svga */
  16. #define    SVGAS3_800x600x16    3    /* 800x600x16 S3 Svga */
  17. #define    SVGAS3_1024x768x16    4    /* 1024x768x16 S3 Svga */
  18. #define    SVGAS3_1280x960x16    5    /* 1280x960x16 S3 Svga */
  19. #define    SVGAS3_1280x1024x16    6    /* 1280x1024x16 S3 Svga */
  20. #define    SVGAS3_640x480x32768    7    /* 640x480x32768 S3 HiColor Svga */
  21. #endif
  22.  
  23. #ifndef XNOR_PUT
  24. #define    XNOR_PUT    5
  25. #define NOR_PUT        6
  26. #define NAND_PUT    7
  27. #define TRANS_COPY_PUT    8    /* Doesn't work with 16-color drivers */
  28. #endif
  29.  
  30. #define RGB(r,g,b) ((r & 31)<<10) | ((g & 31)<<5) | (b & 31)
  31.  
  32. int RealDrawColor(int color)
  33. {
  34.   if (getmaxcolor() > 256) 
  35.     setrgbpalette(1024,(color>>10)&31,(color>>5)&31,color&31);
  36.   return(color);
  37. }
  38.  
  39. int RealFillColor(int color)
  40. {
  41.   if (getmaxcolor() > 256)
  42.     setrgbpalette(1025,(color>>10)&31,(color>>5)&31,color&31);
  43.   return(color);
  44. }
  45.  
  46. int RealColor(int color)
  47. {
  48.   if (getmaxcolor() > 256)
  49.     setrgbpalette(1026,(color>>10)&31,(color>>5)&31,color&31);
  50.   return(color);
  51. }
  52.